@import './variables.scss';
.ui-date-table td.available:hover,
.ui-date-table td.today span {
  color: $color-primary;
}

.ui-icon-warning {
  color: $color-primary;
  margin-right: 5px;
}

.ui-table--striped .ui-table__body tr.ui-table__row--striped td {
  background: #f5f5f5;
}

// 单选框多选框样式
.ui-checkbox__input.is-checked .ui-checkbox__inner {
  background-color: $color-primary;
  border-color: $color-primary;
}

.ui-radio__input.is-checked .ui-radio__inner {
  background-color: #fff !important;
  border-color: $color-primary !important;
  &::after {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: $color-primary !important;
  }
}

.ui-checkbox__input.is-checked + .ui-checkbox__label {
  color: $color-text-main;
}

.ui-dialog {
  .ui-container-full__header {
    text-align: left;
  }
  .formlist {
    .ui-form-item {
      margin-bottom: 0px;
    }
    .result {
      .back,
      .more {
        background: #fff;
      }
    }
  }
  .ui-select {
    width: 100%;
  }
}

// .ui-table {
//   // @extend .balance-list;
// }
// .ui-table .ascending .sort-caret.ascending {
//   border-bottom-color: $color-primary;
// }
// .ui-table .descending .sort-caret.descending {
//   border-top-color: $color-primary;
// }
// .ui-table.balance-header {
//   border-radius: 5px 5px 0px 0px;
//   border: solid 1px #eeeeee;
//   // border-bottom: none;
//   td,
//   th.is-leaf {
//     border-bottom: none;
//   }
//   th,
//   thead {
//     padding: 17px 0;
//     color: black;
//     font-weight: normal !important;
//     background: #fafafa;
//   }
//   background: #fafafa;
//   .ui-table__empty-block {
//     display: none;
//   }
// }
// 单、多选框样式
.ui-checkbox__inner,
.ui-radio__inner {
  width: 16px;
  height: 16px;
  // @include hover;
  border: solid 1px $color-border-1 !important;
}

.ui-checkbox__input.is-indeterminate .ui-checkbox__inner::before {
  color: #fff;
}

.ui-checkbox__input.is-indeterminate .ui-checkbox__inner {
  background-color: $color-primary;
  border-color: $color-primary !important;
}

.ui-container-full {
  .ui-container-full__body {
    position: initial !important;
  }
  position: relative;
  // overflow: auto;
}

.ui-textarea {
  textarea {
    font-family: 'Microsoft YaHei';
  }
}

.ui-checkbox__label {
  font-size: 14px;
  color: #999999;
  padding-left: 6px;
}

// 弹窗
.ui-message-box {
  min-width: 507px;
  h2 {
    text-align: center;
    font-size: 32px;
  }
  .ui-button--primary {
    background: $color-bg-btn-primary;
    border-radius: 4px;
    min-width: 120px;
    height: 40px;
    padding: 0px;
    span,
    a {
      font-size: 16px;
      font-weight: 400;
      text-align: center;
      color: $color-text-primary;
      line-height: 16px;
    }
    &:hover {
      background: $color-bg-btn-primary-hover !important;
    }
  }
}

// 增加全选俩字
.ui-table__header {
  .ui-table-column--selection {
    &:first-child {
      .ui-checkbox {
        .ui-checkbox__input {
          &::after {
            content: '全选';
            margin-left: 5px;
            position: absolute;
            top: 2px;
          }
        }
      }
    }
  }
}

.ui-dialog--center {
  .ui-dialog__body {
    padding: 0px 25px 30px;
  }
  .ui-dialog__header {
    padding: 12px 20px 10px;
  }
}

.ui-input-group--prepend {
  .ui-input-group__prepend {
    background-color: $color-bg-default;
    border: 1px solid $color-border-1;
  }
}

// 表格样式
.ui-table {
  tr {
    background: #ffffff;
  }
  thead {
    th {
      height: 48px;
      background: #f7f9fb;
      .cell {
        font-size: 14px;
        font-family: PingFangSC, PingFangSC-Medium;
        font-weight: 500;
        color: $color-text-sub;
      }
    }
  }
  tbody {
    .hover-row {
      background: #f2f7ff;
    }
    .ui-table__row {
      // 表内容高度由表内容自动撑开
      td {
        height: 48px;
        padding: 0;
      }
      .cell {
        font-size: 14px;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        color: #606266;
      }
    }
  }
  // 修复ui-table fixed列高度错位问题
  .ui-table__fixed-right,
  .ui-table__fixed {
    height: 100% !important;
  }
}
// ui-input 后缀样式
.ui-input__inner:focus {
  border: 1px solid $color-primary;
}

.ui-input__icon {
  color: $color-primary;
  font-size: 20px;
}

// 分页样式
.ui-pagination {
  font-weight: 400;
  text-align: right;
  margin-top: 10px;
  margin-bottom: 30px;
  .ui-pager li {
    padding: 0 4px;
    background: #ffffff;
    vertical-align: top;
    display: inline-block;
    font-size: 13px;
    min-width: 35.5px;
    height: 28px;
    line-height: 28px;
    cursor: pointer;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    text-align: center;
    margin: 0;
    font-family: Helvetica;
    color: #606266;
  }
  .ui-pager li.active {
    color: $color-primary;
  }
}

// 单选样式 - 勾选
.ui-checkbox {
  .ui-checkbox__input.is-checked {
    .ui-checkbox__inner {
      background-color: $color-primary;
      border-color: $color-primary;
      &::after {
        box-sizing: content-box;
        content: '';
        border: 1px solid #ffffff;
        border-left: 0;
        border-top: 0;
        height: 7px;
        left: 5px;
        position: absolute;
        top: 1.5px;
      }
    }
  }
  .ui-checkbox__input.is-indeterminate {
    .ui-checkbox__inner {
      background-color: $color-primary;
      border-color: $color-primary;
      &::before {
        content: '';
        position: absolute;
        display: block;
        background-color: #ffffff;
        height: 2px;
        -webkit-transform: scale(0.5);
        transform: scale(0.5);
        left: 0;
        right: 0;
        top: 6.4px;
      }
    }
  }
}

// 折叠面板
.ui-collapse-item {
  i.ui-collapse-item__arrow {
    border: 1px solid #b5bad0;
    border-radius: 50%;
    text-align: center;
    width: 20px;
    height: 20px;
    line-height: 20px;
  }
  .ui-collapse-item__header {
    background: #f5f7fa;
    border-radius: 4px;
    font-size: 16px;
    font-family: PingFangSC, PingFangSC-Medium;
    font-weight: 500;
    text-align: left;
    color: #333333;
    line-height: 22px;
    padding-left: 20px;
  }
  .ui-collapse-item__wrap {
    border: 1px solid #ebeef5;
  }
}

// 下拉列表样式
.ui-select-dropdown__item.selected {
  color: $color-text-hover;
  background-color: $color-bg;
  font-weight: 400;
}

// 弹窗样式
.ui-dialog {
  border-radius: 8px;
  .ui-dialog__header {
    margin: 0 auto;
    padding-top: 40px;
    .ui-dialog__title {
      font-size: 20px;
      font-family: SourceHanSansCN, SourceHanSansCN-Medium;
      font-weight: 500;
      color: #333333;
      line-height: 30px;
      letter-spacing: 0px;
      padding-bottom: 40px;
      display: contents;
      text-align: center;
    }
  }
  .ui-dialog__body {
    padding: 0 40px 40px;
  }
  .ui-dialog__footer {
    text-align: center;
    padding-bottom: 40px;
    padding-top: 0;
  }
}

// 日期选择
.ui-date-range-picker {
  .ui-picker-panel__sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
  .ui-picker-panel__shortcut {
    /* margin-left: 20px; */
    margin: 0;
    text-align: center;
  }
}

// 标题tabs切换
.ui-tabs {
  .ui-tabs__header {
    margin-bottom: 29px;
  }
}

//去除表格全选字
.ui-table__header .ui-table-column--selection:first-child .ui-checkbox .ui-checkbox__input::after {
  content: ' ' !important;
}

// 蓝色实心按钮
.primary-btn {
  background: $color-bg-btn-primary;
  border-radius: 4px;
  min-width: 120px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-text-primary;
    line-height: 16px;
  }
  &:hover {
    background: $color-bg-btn-primary-hover !important;
  }
  &:focus {
    background: $color-bg-btn-primary-active !important;
  }
  &:disabled {
    opacity: 0.5;
    background: $color-bg-btn-primary !important;
  }
}

// 蓝色实心按钮 - 长
.primary-long-btn {
  background: $color-bg-btn-primary;
  border-radius: 4px;
  min-width: 150px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-text-primary;
    line-height: 16px;
  }
  &:hover {
    background: $color-bg-btn-primary-hover !important;
  }
  &:focus {
    background: $color-bg-btn-primary-active !important;
  }
  &:disabled {
    opacity: 0.5;
    background: $color-bg-btn-primary !important;
  }
}

// 白色空心按钮
.default-btn {
  background: $color-bg-default;
  border-radius: 4px;
  border-color: $color-border-6;
  min-width: 120px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-text-default;
    line-height: 16px;
  }
  &:hover {
    border: 1px solid $color-border-7 !important;
  }
  &:focus {
    border: 1px solid $color-border-8 !important;
  }
  &:disabled {
    opacity: 0.5;
    border: 1px solid $color-border-6 !important;
  }
}

// 白色空心按钮 - 长
.default-long-btn {
  background: $color-bg-default;
  border-radius: 4px;
  border-color: $color-border-6;
  min-width: 150px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-text-default;
    line-height: 16px;
  }
  &:hover {
    border: 1px solid $color-border-7 !important;
  }
  &:focus {
    border: 1px solid $color-border-8 !important;
  }
  &:disabled {
    opacity: 0.5;
    border: 1px solid $color-border-6 !important;
  }
}

// 蓝色空心按钮
.info-btn {
  background: $color-bg-default;
  border-radius: 4px;
  border-color: $color-border-7;
  min-width: 120px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-text-hover;
    line-height: 16px;
  }
  &:hover {
    background-color: $color-bg-btn-info-hover !important;
    border-color: $color-border-7 !important;
  }
  &:focus {
    border: 1px solid $color-border-8 !important;
    background-color: $color-bg-btn-info-active !important;
  }
  &:disabled {
    opacity: 0.5 !important;
    background-color: $color-bg-btn-info-active !important;
  }
}

// 蓝色空心按钮 - 长
.info-long-btn {
  background: $color-bg-default;
  border-radius: 4px;
  border-color: $color-border-7;
  min-width: 150px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-text-hover;
    line-height: 16px;
  }
  &:hover {
    background-color: $color-bg-btn-info-hover !important;
    border-color: $color-border-7 !important;
  }
  &:focus {
    border: 1px solid $color-border-8 !important;
    background-color: $color-bg-btn-info-active !important;
  }
  &:disabled {
    opacity: 0.5 !important;
    background-color: $color-bg-btn-info-active !important;
  }
}

// 红色实心按钮
.danger-btn {
  background: $color-bg-btn-danger;
  border-radius: 4px;
  min-width: 120px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-text-primary;
    line-height: 16px;
  }
  &:hover {
    background-color: $color-bg-btn-danger-hover !important;
  }
  &:focus {
    background-color: $color-bg-btn-danger-active !important;
  }
  &:disabled {
    background-color: $color-bg-btn-danger-active !important;
    opacity: 0.5 !important;
  }
}

// 红色实心按钮 - 长
.danger-long-btn {
  background: $color-bg-btn-danger;
  border-radius: 4px;
  min-width: 150px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-text-primary;
    line-height: 16px;
  }
  &:hover {
    background-color: $color-bg-btn-danger-hover !important;
  }
  &:focus {
    background-color: $color-bg-btn-danger-active !important;
  }
  &:disabled {
    background-color: $color-bg-btn-danger-active !important;
    opacity: 0.5 !important;
  }
}

// 红色空心按钮
.danger-info-btn {
  border-color: $color-bg-btn-danger;
  border-radius: 4px;
  min-width: 120px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    text-align: center;
    color: $color-bg-btn-danger;
    line-height: 16px;
  }
  &:hover,
  &:focus {
    border-color: $color-bg-btn-danger !important;
  }
  &:disabled {
    opacity: 0.5 !important;
  }
}

// 红色空心按钮 - 长
.danger-info-long-btn {
  border-color: $color-bg-btn-danger;
  border-radius: 4px;
  min-width: 150px;
  height: 40px;
  padding: 0px;
  span,
  a {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: $color-bg-btn-danger;
    line-height: 16px;
  }
  &:hover,
  &:focus {
    border-color: $color-bg-btn-danger !important;
  }
  &:disabled {
    opacity: 0.5 !important;
  }
}

// 两个单选按钮组,宽150px,高40px
.two-radio-group {
  .ui-radio-button__inner {
    width: 150px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    background-color: $color-bg-default;
    color: $color-text-main;
    border: 1px solid $color-border-1;
    box-shadow: $color-primary -1px 0px 0px 0p;
  }
  .is-active {
    .ui-radio-button__orig-radio:checked + .ui-radio-button__inner {
      color: $color-primary;
      background-color: $color-bg-default;
      border-color: $color-border-5;
      box-shadow: none;
    }
  }
}

// 三个单选按钮组,宽100px,高40px
.three-radio-group {
  .ui-radio-button__inner {
    width: 100px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    background-color: $color-bg-default;
    color: $color-text-main;
    border: 1px solid $color-border-1;
    box-shadow: $color-primary -1px 0px 0px 0p;
  }
  .is-active {
    .ui-radio-button__orig-radio:checked + .ui-radio-button__inner {
      color: $color-primary;
      background-color: $color-bg-default;
      border-color: $color-border-5;
      box-shadow: none;
    }
  }
}

// 五个单选按钮组,宽76px,高40px
.five-radio-group {
  .ui-radio-button__inner {
    width: 76px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    background-color: $color-bg-default;
    color: $color-text-main;
    border: 1px solid $color-border-1;
    box-shadow: $color-primary -1px 0px 0px 0p;
  }
  .is-active {
    .ui-radio-button__orig-radio:checked + .ui-radio-button__inner {
      color: $color-primary;
      background-color: $color-bg-default;
      border-color: $color-border-5;
      box-shadow: none;
    }
  }
}

// 三个单选按钮组,宽100px,高40px
.three-radio-group {
  .ui-radio-button__inner {
    width: 100px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    background-color: $color-bg-default;
    color: $color-text-main;
    border: 1px solid $color-border-1;
    box-shadow: $color-primary -1px 0px 0px 0p;
  }
  .is-active {
    .ui-radio-button__orig-radio:checked + .ui-radio-button__inner {
      color: $color-primary;
      background-color: $color-bg-default;
      border-color: $color-border-5;
      box-shadow: none;
    }
    /* 原生table需要居中的元素统一用的class */
    .detail-info-table {
      width: 100%;
      border-collapse: collapse;
      td {
        background: #ffffff;
        font-size: 14px;
        font-weight: 500;
        text-align: left;
        color: #333333;
        line-height: 14px;
        border: 1px solid #ccc;
        padding: 0 14px;
        height: 48px;
        border: 1px solid #ebeef5;
      }
      /* 表格中的标题部分 */
      .detail-info-table-title {
        background: #f7f9fb;
        background-clip: padding-box;
        text-align: center;
        color: #909399;
      }
    }
  }
}

//  tabs边距156px
.title-tabs {
  > .ui-tabs__header {
    padding-left: 156px;
  }
}
